<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class MatchOrder extends Model
{
    protected $dateFormat = 'U';

    protected $fillable = [
        'deposit_trade_queue_id','withdraw_trade_queue_id','amount',
        'deposit_proof_img_url','deposit_confirm_at','withdraw_confirm_at',
        'deposit_arbitration_at','withdraw_arbitration_at'

    ];
    public function depositQueue()
    {
        return $this->belongsTo(TradeQueue::class,'deposit_trade_queue_id','id');
    }

    public function withdrawQueue()
    {
        return $this->belongsTo(TradeQueue::class,'withdraw_trade_queue_id','id');
    }

    public function complains()
    {
        return $this->hasMany(Complain::class);
    }
}
